extends "../ib.gd"
var yuanlist = ["i_bangled","i_bangleh","i_bangleb"]
var target = null
#根据等级增加属性
func addatt():
	if self.id.find("MAX") != -1:
		att.atk += 45 - 18
	else:
		att.atk += 18
	if self.id.find("bangled") != -1:
		att.penL += 0.035
		att.mgiPenL += 0.035
	elif self.id.find("bangleh") != -1:
		att.cri += 0.05
	else:
		att.cd += 0.1
	pass
		
#进化装备
func upgradeself(item):
	var chose = item.chose
	var c = str(chose)
	var uplist = ["13","25"]
	var upid = ""
	if chose == 4 || (6<= chose && chose <= 8):
		upid = sys.rndListItem(uplist)
	else:
		for i in uplist:
			if i.find(c) != -1:
				upid = i
				break
	upid = upid + "_Hide"
	if yuanlist.find(self.id) == -1:
		upid = "_MAX"
	upid = self.id + upid
	self.switchchose(chose)
	var nitem = sys.newItem(upid)
	sys.main.player.addItem(nitem)
	masCha.addItem(nitem)
	nitem.inheritatt(nitem,self)
	nitem.addatt()
	nitem.upinfo()
	self.delself()